{include file="public/layout" /}
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-form layui-border-box layui-table-view house-table" lay-id="admin-arctype" >
                <div class="layui-table-box">
                    <div class="layui-table-body " >
                        <table cellspacing="0" cellpadding="0" border="0" class="layui-table layui-form" style="width: 100%" lay-skin="line">
                            <thead >
                            <tr>
                                <th class="w120">
                                    <div class="layui-table-cell w120"><span>模板名称</span></div>
                                </th>
                                <th class="w150 tc">
                                    <div class="layui-table-cell  w150 tc"><span>短信签名</span></div>
                                </th>
                                <th class="w200 tc">
                                    <div class="layui-table-cell w200 tc"><span>短信模板ID</span></div>
                                </th>
                                <th>
                                    <div class="layui-table-cell wauto"><span>发送短信内容</span></div>
                                </th>
                            </tr>
                            </thead>
                            <tbody>
                            {empty name="list"}
                            <tr>
                                <td colspan="4" class="no-data tc">
                                    没有符合条件的数据
                                </td>
                            </tr>
                            {else/}
                            {foreach name="list" item="vo" key="k" }
                            <tr>
                                <td>
                                    <div class="layui-table-cell w120">
                                        {$vo.tpl_title}
                                    </div>
                                </td>
                                <td>
                                    <div class="layui-table-cell  w150 tc">
                                        <input type="text" name="sms_sign" lay-verify="required" value="{$vo.sms_sign}" onchange="changeTableVal('sms_template','tpl_id','{$vo.tpl_id}','sms_sign',this);" class="layui-input">
                                    </div>
                                </td>
                                <td>
                                    <div class="layui-table-cell w200 tc">
                                        <input type="text" name="sms_tpl_code" lay-verify="required" value="{$vo.sms_tpl_code}" onchange="changeTableVal('sms_template','tpl_id','{$vo.tpl_id}','sms_tpl_code',this);" class="layui-input">
                                    </div>
                                </td>
                                <td>
                                    <div class="layui-table-cell wauto">
                                        <input type="text" name="tpl_content" lay-verify="required" value="{$vo.tpl_content}" onchange="changeTableVal('sms_template','tpl_id','{$vo.tpl_id}','tpl_content',this);" class="layui-input">
                                    </div>
                                </td>
                            </tr>
                            {/foreach}
                            {/empty}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    layui.config({
        base: '__SKIN__/' //静态资源所在路径
        ,version: '{$version}'
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form'], function(){
        var $ = layui.$
            ,form = layui.form;

        form.on('switch(is_open)', function(data){
            changeTableVal('smtp_tpl','tpl_id',$(this).data('tpl_id'),'is_open',this);
            return false;
        });

    });

</script>
{include file="public/footer" /}